package texas_holdem.game;

import texas_holdem.data.Card;

public class Hand {

	private final int tableSize = 5;
	private Card _first;
	private Card _second;
	private Card[] _table;
	private double _odds;
	
	public Hand(Card first, Card second)
	{
		_first = first;
		_second = second;
		_table = new Card[tableSize];
		for (int i = 0 ; i < tableSize; i++)
			_table[i] = null;
	}

	public Hand(Card first, Card second, double odds)
	{
		_first = first;
		_second = second;
		_table = new Card[tableSize];
		for (int i = 0 ; i < tableSize; i++)
			_table[i] = null;
		_odds = odds;
	}

	public Hand(Card first, Card second, Card[] table)
	{
		_first = first;
		_second = second;
		_table = new Card[table.length];
		for (int i = 0 ; i < table.length; i++)
			_table[i] = table[i];
		_odds = 0;
	}
	public Card getFirst()
	{
		return _first;
	}
	public Card getSecond()
	{
		return _second;
	}
	public double getOdds()
	{
		return _odds;
	}
	public Card[] getTable()
	{
		return _table;
	}
	
	public void setOdds(double odds)
	{
		_odds = (int)(odds*10000)/100.0;
	}
	
	public void flop(Card c1, Card c2, Card c3)
	{
		_table[0] = c1;
		_table[1] = c2;
		_table[2] = c3;
	}
	
	public void flop(Card cards[])
	{
		_table[0] = cards[0];
		_table[1] = cards[1];
		_table[2] = cards[2];
	}
	
	public void turn (Card c)
	{
		_table[3] = c;
	}
	public void river (Card c)
	{
		_table[4] = c;
	}
	
	
	
}
